package com.jcw.kqxt.controller;

import com.jcw.kqxt.customAnnotation.PermissionVerification;
import com.jcw.kqxt.result.JSONResult;
import com.jcw.kqxt.service.IExcelService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletResponse;

@RestController
@RequestMapping("/export")
public class ExcelController {

    @Autowired
    private IExcelService excelService;

    @PostMapping("/attendance")
    @PermissionVerification(auth = "export:attendance")
    public JSONResult attendanceExport(HttpServletResponse response,String month){
        return excelService.export(response,month);
    }
}
